package com.ruoyi.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.ServicePeopleMapper;
import com.ruoyi.domain.ServicePeople;
import com.ruoyi.service.IServicePeopleService;

/**
 * 服务人员Service业务层处理
 * 
 * @author jack
 * @date 2025-01-12
 */
@Service
public class ServicePeopleServiceImpl implements IServicePeopleService 
{
    @Autowired
    private ServicePeopleMapper servicePeopleMapper;

    /**
     * 查询服务人员
     * 
     * @param id 服务人员主键
     * @return 服务人员
     */
    @Override
    public ServicePeople selectServicePeopleById(Long id)
    {
        return servicePeopleMapper.selectServicePeopleById(id);
    }

    /**
     * 查询服务人员列表
     * 
     * @param servicePeople 服务人员
     * @return 服务人员
     */
    @Override
    public List<ServicePeople> selectServicePeopleList(ServicePeople servicePeople)
    {
        return servicePeopleMapper.selectServicePeopleList(servicePeople);
    }

    /**
     * 新增服务人员
     * 
     * @param servicePeople 服务人员
     * @return 结果
     */
    @Override
    public int insertServicePeople(ServicePeople servicePeople)
    {
        servicePeople.setCreateTime(DateUtils.getNowDate());
        return servicePeopleMapper.insertServicePeople(servicePeople);
    }

    /**
     * 修改服务人员
     * 
     * @param servicePeople 服务人员
     * @return 结果
     */
    @Override
    public int updateServicePeople(ServicePeople servicePeople)
    {
        return servicePeopleMapper.updateServicePeople(servicePeople);
    }

    /**
     * 批量删除服务人员
     * 
     * @param ids 需要删除的服务人员主键
     * @return 结果
     */
    @Override
    public int deleteServicePeopleByIds(Long[] ids)
    {
        return servicePeopleMapper.deleteServicePeopleByIds(ids);
    }

    /**
     * 删除服务人员信息
     * 
     * @param id 服务人员主键
     * @return 结果
     */
    @Override
    public int deleteServicePeopleById(Long id)
    {
        return servicePeopleMapper.deleteServicePeopleById(id);
    }
}
